home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / INITWIN.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  104 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _InitWin(Win_Name, Win_TR, Win_TC, Win_BR, Win_BC, Win_Color,Win_Up) --> NIL
  8.  
  9. PARAMETERS:
  10.  
  11. Win_Name  :  Window Name (name referenced by)
  12. Win_TR    :  Window Corrdinates
  13. Win_TC    :  ""
  14. Win_BR    :  ""
  15. Win_BC    :  ""
  16. Win_Color :  Window Color Scheme
  17. Win_Up    :  Scroll direction 0 = Down, 1 = Up
  18.  
  19. SHORT:
  20.  
  21. Initialize a scrolling window for use by other _????Win() functions.
  22.  
  23. DESCRIPTION:
  24.  
  25. These functions comprise a set of functions that initialize, update, clear
  26. and kill scrolling windows that scroll information sent to them.
  27.  
  28. Each array element, up to the number that will fit inside the window
  29. coordinates, has it's first 20 positions filled with information about the
  30. window itself.  This allows the array to keep it's number of elements, length
  31. of each element, and the coordinates without any reference to some other
  32. information variables.  All that is created is the array itself, and it is
  33. self containing.  The passed text is added after position 20, and displayed
  34. from there as well.
  35.  
  36. Any fiddling with the first 27 bytes of the array is bound to cause problems.
  37.  
  38. Window motion is either from bottom to top, (1 = upward) or from top to
  39. bottom (0 = downward).
  40.  
  41. Each element of the array created has the following structure in it's first
  42. 27 bytes:
  43.  
  44. String to Build: "xxxxxxxxxx##########xxxxxx#"
  45.         Defined:  aaaaaaaaaabbccddeeffggggggh
  46.  
  47. a = Name of the Window  (MAX LENGTH OF NAME 10,space padded)
  48. b = # of history positions to be kept (MAX maxrow())
  49. c = window top left row               (MIN 0)
  50. d = window top left col               (MIN 0)
  51. e = window bottom right row           (MAX maxcol())
  52. f = window bottom right col           (MAX maxcol())
  53. g = window display color              ("W+/N")
  54. h = Window Upward Motion              1=T 0=F
  55.  
  56.  
  57. _InitWin() initializes a scroll window called "exp<c1>" that operates within
  58. the coordinates n1,n2 to n3,n4.  It must be called prior to any call
  59. _UpdtWin() that references this window.
  60.  
  61. NOTE:
  62.  
  63.  
  64.  
  65. EXAMPLE:
  66.  
  67. * initialize two scroll windows
  68. _InitWin('Current',10,10,20,35)
  69. _InitWin('History',10,40,20,75)
  70.  
  71. * Update them with some text
  72. _UpdtWin('Current','Cur Line One')  // send to first window
  73. _UpdtWin('History','Hist Line One') // send this to second window
  74.  
  75. _UpdtWin('Current','Cur Line Two')  // ditto
  76. _UpdtWin('History','Hist Line Two') // ditto
  77.  
  78. _ClrWin('History')  // clear the history window - current remains unchanged
  79.  
  80. _UpdtWin('Current','Cur Line Three')  // add more
  81. _UpdtWin('History','Hist Line Three')
  82.  
  83. _UpdtWin('Current','Cur Line Four')   // still more
  84. _UpdtWin('History','Hist Line Four')
  85.  
  86. * at this point, the "CURRENT" window contains:
  87. *
  88. *    Cur Line One
  89. *    Cur Line Two
  90. *    Cur Line Three
  91. *    Cur Line Four
  92. *
  93. * and the "HISTORY" window contains
  94. *
  95. *   Hist Line Three
  96. *   Hist Line Four
  97.  
  98. _KillWin('Current')                   // kill both windows
  99. _KillWin('History')
  100.  
  101. * Both windows disappear!
  102.  
  103. ******************************************************************************/
  104.